package utils

import (
	"crypto/rand"
	"encoding/hex"
	"fmt"
)

func Qid() (string, error) {
	b := make([]byte, 16)
	n, err := rand.Read(b)
	if n != len(b) || err != nil {
		return "", fmt.Errorf("Could not successfully read from the system CSPRNG.")
	}
	return hex.EncodeToString(b), nil
}

//func SessionId() string {
//	b := make([]byte, 32)
//	if _, err := io.ReadFull(rand.Reader, b); err != nil {
//		return ""
//	}
//	return base64.URLEncoding.EncodeToString(b)
//}
